// 首页的样式less文件
@import "common";
// @import 导入的意思 可以把一个样式文件导入到另外一个样式文件里面
// link 是把一个 样式文件引入到 html页面里面
*{
    margin: 0;
    padding: 0;
}
img{
    vertical-align: top;
}
ul,ol{
    list-style: none;;
}
body {
    background:#F7F7F7;
    min-width: 320px;
    width: 15rem;
    margin: 0 auto;
    line-height: 1.5;
    font-family: Arial,Helvetica;
    
}
// 页面元素rem计算公式： 页面元素的px / html 字体大小 50
// search-content
@baseFont: 50;
.search-content {
    display: flex;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 15rem;
    height: 88rem / @baseFont;
    z-index: 10;
    background-color:#FFC001;
    .classify {
        width: 44rem / @baseFont;
        height: 70rem / @baseFont;
        margin: 11rem / @baseFont 25rem / @baseFont 7rem / @baseFont 24rem / @baseFont;
        background: url(../images/classify.png) no-repeat;
        // 背景缩放
        background-size: 44rem / @baseFont 70rem / @baseFont;
    }
    .search {
        flex: 1;
        input {
            outline: none;
            width: 100%;
            border: 0;
            height: 66rem / @baseFont;
            border-radius: 33rem / @baseFont;
            background-color:#FFF2CC;
            margin-top: 12rem / @baseFont;
            font-size: 25rem / @baseFont;
            padding-left: 55rem / @baseFont;
            color: #757575;
        }
    }
    .login {
        width: 75rem / @baseFont;
        height: 70rem / @baseFont;
        line-height: 70rem / @baseFont;
        margin: 10rem / @baseFont;
        font-size: 25rem / @baseFont;
        text-align: center;
        color: #fff;

    }
}

// banner
.banner {
    width: 750rem / @baseFont;
    height: 368rem / @baseFont;
    img {
        width: 100%;
        height: 100%;
    }
}
// ad
.ad {
    display: flex;
    a {
        flex: 1;
        img {
            width: 100%;
        }
    }
}
// nav
nav {
    width: 750rem / @baseFont;
    display: flex;
    flex-wrap: wrap;
    a{
        flex: 20%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 20rem / @baseFont;
        img{
            width: 84rem / @baseFont;
            height: 84rem / @baseFont;
        }
        span{
            font-size: 20rem / @baseFont;
            color: #333;
            margin-top: 10rem / @baseFont;
        }
    }
}
// 设置礼包部分的样式
.bag{
    width: 750rem / @baseFont;
    display: flex;
    a{
        flex: 1;
        &:first-child{
            flex: 2;
        }
        &:nth-child(2){
            border-right: 1px solid #ccc;
            border-left: 1px solid #ccc;
            box-sizing: border-box;
        }
        img{
            width: 100%;
        }
    }
}

// 设置 活动部分的样式
.activity{
    width: 700rem / @baseFont;
    margin: 20rem / @baseFont auto;
    display: flex;
    flex-wrap: wrap;
    border-radius: 20px;
    overflow: hidden;
    .act{
        flex: 1;
        padding: 30rem / @baseFont;
        padding-bottom: 10rem / @baseFont;;
        background: #FFFFFF;
        border-bottom: 1px solid #F2F2F2;
        &:nth-child(odd){
            border-right: 1px solid #F2F2F2;
            box-sizing: border-box;
        }
        &:first-child{
            .act-commod-box{
                p{
                    color: #FF5500;
                    background: none;
                }
            }
        }
        .act-title{
            font-weight: bold;
            font-size: 40rem / @baseFont;
        }
        &>p{
            font-size: 26rem / @baseFont;
            margin-top: 10rem / @baseFont;
            color: #ccc;
        }
        .act-commod-box{
            display: flex;
            
            a{
                flex: 50%;
                text-align: center;
                margin-top: 20rem / @baseFont;
                color: #333;
                
                img{
                    width:120rem / @baseFont;
                    
                }
                p{
                    font-size: 20rem / @baseFont;
                    width: 90%;
                    background: url("../upload/act-bg.png") no-repeat;
                    // background-size: 150rem / @baseFont 54rem / @baseFont;
                    background-size: 100% 100%;
                    padding-top: 30rem / @baseFont;
                    margin-top:  -30rem / @baseFont;
                    position: relative;
                    // z-index: 100;
                }
            }
        }
    }
}

// 设置猜你喜欢部分的样式
.love{
    width: 700rem / @baseFont;
    margin: 0px auto;
    padding-bottom: 100rem / @baseFont;
    .love-title{
        img{
            width: 100%;
        }
    }
    ul{
        width: 100%;
        display: flex;
        justify-content: space-between; 
        flex-wrap: wrap;
        li{
            // flex: 50%;
            width: 48%;
            background-color: #fff;
            padding: 10rem / @baseFont;
            box-sizing: border-box;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: 20rem / @baseFont;
            img{
                width: 100%;
            }
            h3{
                font-size: 30rem / @baseFont;
                width: 90%;
                height: 65rem / @baseFont;
                overflow: hidden;
                margin: 10rem / @baseFont auto;
            }
            p{
                line-height: 30rem / @baseFont;
                margin-left: 20rem / @baseFont;
                span{
                    font-size: 20rem / @baseFont;
                    border: 1px solid #FFBB00;
                    padding: 3px 8px;
                    border-radius: 7px;
                    &:first-child{
                        background-color: #FFBB00;
                    }
                }
            }
            div{
                margin-left: 20rem / @baseFont;
                span{
                    color: #999999;
                    font-size: 30rem / @baseFont;
                    &:first-child{
                        color: #FF4F2F;
                        font-size: 40rem / @baseFont;
                        font-weight: bold;
                    }
                }
            }
        }
    }
}

// 设置footer部分的样式
.footer{
    width: 750rem / @baseFont;
    height: 100rem / @baseFont;
    background-color: #fff;
    border-top: 1px solid #ccc;
    position: fixed;
    bottom: 0px;
    ul{
        width: 100%;
        display: flex;
        height: 100%;
        align-items: center;

        li{
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            img{
                width: 50rem / @baseFont;
            }
            span{
                font-size: 20rem / @baseFont;
            }
        }
    }

}
